'''
Created on 04-Apr-2010

@author: darsh
'''
import sys
from PyQt4 import QtGui,QtCore,Qt


class MainWidget(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)
        self.setWindowFlags(Qt.Qt.Desktop)
        self.scene = QtGui.QGraphicsScene()
        desktop=app.desktop()
        geom=QtCore.QRectF(desktop.screenGeometry())
        geom.setWidth(geom.width()-15)
        geom.setHeight(geom.height()-15)
        self.scene.setItemIndexMethod(QtGui.QGraphicsScene.NoIndex)
        self.view = QtGui.QGraphicsView(self.scene)
        self.scene.setSceneRect(geom)
        self.view.setRenderHint(QtGui.QPainter.Antialiasing)
        brush=QtGui.QBrush(QtGui.QPixmap('/home/darsh/Data/wallpapers/Star-Wars-1598.jpg').scaled(geom.width(),geom.height()))
        self.view.setBackgroundBrush(brush)
        self.view.setWindowTitle("VerbDesk")
        self.layout=QtGui.QVBoxLayout()
        self.layout.setMargin(0)
        self.layout.addWidget(self.view)
        self.setLayout(self.layout)
        
        

if __name__=="__main__":
    app=QtGui.QApplication(sys.argv)
    #opeffect=QtGui.QGraphicsBlurEffect()
    Form = MainWidget()
    #Form.setGeometry(0,0,640,480)
    
    #Form.resize(1040,840)
    #Form.setWindowTitle("VerbDesk")
    #Form.setWindowOpacity(0.86)
    #Form.setFixedSize(640,480)
    # Form.setWindowOpacity(0.7)
    #ui = VerbsListWidget()
    #ui.setupUi(Form)
    #Form.setEffect(opeffect)
    #view.setDragMode(QtGui.QGraphicsView.ScrollHandDrag)
    #
    #view.show()
    Form.showFullScreen()
    
    #Form.fireverb()
    #  Form.fireverb()
    sys.exit(app.exec_())


